<html>
	<table border="1">
		<tr>
			<td>&nbsp;</td>
			<% @boards.each do |b| %>
				<td>
					<%= link_to b.id, edit_board_path(b) %>
				</td>
			<% end %>			
		</tr>
		<% @players.each do |p| %>
		<tr>
			<td>
				<%= link_to p.name, edit_player_path(p) %>	
			</td>
			<% @boards.each do |b| %>
			<% score = @scores.select {|s| s.board_id == b.id && s.player_id == p.id}[0]%>
			<td>
				<%= link_to score.nil? ? 'NP' : score.position, new_score_path(p,b) %>
			</td>
			<% end %>
		</tr>
		<% end %>
	</table>
	<table>
		<tr><td><%=link_to "new player", new_player_path %></td></tr>
		<tr><td><%=link_to "new board", new_board_path %></td></tr>
	</table>
</html>
